package com.pj;


import com.fly.jdbc.cfg.FlyConfig;
import com.fly.jdbc.cfg.FlyObjects;
import com.pj.gen.GenUtil;
import com.pj.gen.Print;
import com.pj.gen.cfg.GenCfgManager;

public class SpGenerateApplicationAtcc {

    public static void main(String[] args) {

        FlyConfig config = new FlyConfig();
        config.setDriverClassName("com.mysql.jdbc.Driver");
        config.setUrl("jdbc:mysql://127.0.0.1:3306/atcc?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC");
        config.setUsername("root");
        config.setPassword("123456");
        // 是否打印sql
        config.setPrintSql(true);
        // 注入到框架中
        FlyObjects.setConfig(config);


        GenCfgManager.cfg
                .setProjectPath("D:/workspaceweb")
                .setServerProjectName("workshop-java")
                .setPackagePath("com.ciih.workshop")
                .addTableName("anli_tour_dry_line_ganya","anli_tour_dry_line_ganya_craft","anli_tour_wet_grinding_line_ganya","anli_tour_wet_grinding_line_ganya_craft")
        ;


        System.out.println("\n\n\n--------------------------------------------\n\n\n");


        GenUtil.doRead();
        GenUtil.doOutMybatisPlus();
        //自动建表生成RBAC的用户系统。
//        GenUtil.doCreateTable(null, null, null, null);
        //用户表的表名（用来自动生成token的Key）
        GenUtil.doOutAdminVue();


        Print.printY("\n\n------------------------------ 完结撒花 ------------------------------");
    }
}